﻿<%@ Page Title="" Language="C#" MasterPageFile="~/Site.master" AutoEventWireup="true"
    CodeFile="SelectBank.aspx.cs" Inherits="Auditors_SelectBank" %>

<%@ Register src="topnav.ascx" tagname="topnav" tagprefix="uc1" %>

<asp:Content ID="Content1" ContentPlaceHolderID="HeadContent" runat="Server">
    <script src="../Scripts/jquery-1.4.1.js" type="text/javascript"></script>
    <script src="../Scripts/cookies.js" type="text/javascript"></script>
    <script>
        $(function () {
            if (location.search.indexOf("error=True") > 0) {
                history.go(-1);
            }
        });
        function GoToCreateBank(id, orderid, type) {
            window.location.href = "EnterBank2.aspx?CompanyID=" + id + "&orderid=" + orderid + "&type=" + type;
        }
        function GoToSales(id, orderid) {
            window.location.href = "SelectSales.aspx?CompanyID=" + id + "&orderid=" + orderid;
        }
        function GoTo(page, id, orderid) {
            window.location.href = page + "?CompanyID=" + id + "&orderid=" + orderid;
        }


        function OpenIfream(page, id, orderid, type) {
            // $("#myifream").src = page + "?CompanyID=" + id + "&orderid=" + orderid + "&type=" + type;
            // document.getElementById("iframeid").src = page + "?CompanyID=" + id + "&orderid=" + orderid + "&type=" + type;
            $("iframe")[0].src = page + "?CompanyID=" + id + "&orderid=" + orderid + "&type=" + type;


        }
    </script>
</asp:Content>
<asp:Content ID="Content2" ContentPlaceHolderID="MainContent" runat="Server">
  <uc1:topnav 
                            ID="topnav1" runat="server" />
    <table>
        <tr style="vertical-align: top">
            <%--  <td>
                <ul>
                    <li>
                        <input type="button" value="董事信息" onclick='GoTo("CompanyDirectors.aspx","<% =Request.QueryString["CompanyID"]%>","<% =Request.QueryString["orderid"]%>");' /></li>
                    <li>
                        <input type="button" value="银行月结单" onclick='GoTo("SelectBank.aspx","<% =Request.QueryString["CompanyID"]%>","<% =Request.QueryString["orderid"]%>");' /></li>
                    <li>
                        <input type="button" value="销货凭证" onclick='GoTo("SelectSales.aspx","<% =Request.QueryString["CompanyID"]%>","<% =Request.QueryString["orderid"]%>");' /></li>
                    <li>
                        <input type="button" value="购货凭证" onclick='GoTo("selectPurchase.aspx","<% =Request.QueryString["CompanyID"]%>","<% =Request.QueryString["orderid"]%>");' /></li>
                    <li>
                        <input type="button" value="开支明细" onclick='GoTo("CompanyDetail.aspx","<% =Request.QueryString["CompanyID"]%>","<% =Request.QueryString["orderid"]%>");' /></li>
                    <li>
                        <input type="button" value="描述" onclick='GoTo("ProfitTax.aspx","<% =Request.QueryString["CompanyID"]%>","<% =Request.QueryString["orderid"]%>");' /></li>
                    <li>
                        <input type="button" value="报表" onclick='GoTo("companyTable.aspx","<% =Request.QueryString["CompanyID"]%>","<% =Request.QueryString["orderid"]%>");' /></li>
                </ul>
            </td>--%>
            <td>
                <ul>
                    <li>
                        <input type="button" value="银行結餘" onclick='OpenIfream("CompanyBankMantissa2.aspx","<% =Request.QueryString["CompanyID"]%>","<% =Request.QueryString["orderid"]%>","mantissa");' />
&nbsp;</li>
                    <li>
                        <input type="button" value="储蓄账户" onclick='OpenIfream("SelectBankSavings.aspx","<% =Request.QueryString["CompanyID"]%>","<% =Request.QueryString["orderid"]%>","Savings");' />
                    </li>
                    <li>
                        <input type="button" value="支票账户" onclick='OpenIfream("SelectBankCheck.aspx","<% =Request.QueryString["CompanyID"]%>","<% =Request.QueryString["orderid"]%>","Check");' />
                    </li>
                    <li>
                        <input type="button" value="美金账户" onclick='OpenIfream("SelectBankUS.aspx","<% =Request.QueryString["CompanyID"]%>","<% =Request.QueryString["orderid"]%>","US");' />
                    </li>
                    <li>
                        <input type="button" value="人民币账户" onclick='OpenIfream("SelectBankRMB.aspx","<% =Request.QueryString["CompanyID"]%>","<% =Request.QueryString["orderid"]%>","RMB");' />
                    </li>
                    <li>
                        <input type="button" value="英镑账户" onclick='OpenIfream("SelectBankGBP.aspx","<% =Request.QueryString["CompanyID"]%>","<% =Request.QueryString["orderid"]%>","GBP");' />
                    </li>
                    <li>
                        <input type="button" value="加拿大元账户" onclick='OpenIfream("SelectBankCAD.aspx","<% =Request.QueryString["CompanyID"]%>","<% =Request.QueryString["orderid"]%>","CAD");' />
                    </li>
                    <li>
                        <input type="button" value="瑞士法郎账户" onclick='OpenIfream("SelectBankCHF.aspx","<% =Request.QueryString["CompanyID"]%>","<% =Request.QueryString["orderid"]%>","CHF");' />
                    </li>
                    <li>
                        <input type="button" value="日元账户" onclick='OpenIfream("SelectBankJPY.aspx","<% =Request.QueryString["CompanyID"]%>","<% =Request.QueryString["orderid"]%>","JPY");' />
                    </li>
                    <li>
                        <input type="button" value="澳元账户" onclick='OpenIfream("SelectBankAUD.aspx","<% =Request.QueryString["CompanyID"]%>","<% =Request.QueryString["orderid"]%>","AUD");' />
                    </li>
                    <li>
                        <input type="button" value="欧罗账户" onclick='OpenIfream("SelectBankEUR.aspx","<% =Request.QueryString["CompanyID"]%>","<% =Request.QueryString["orderid"]%>","EUR");' />
                    </li>
                    <%--
                    <li>
                        <input type="button" value="其他账户" onclick='OpenIfream("SelectBankOther.aspx","<% =Request.QueryString["CompanyID"]%>","<% =Request.QueryString["orderid"]%>","other");' />
                    </li>--%>
                </ul>
            </td>
            <td>
                <div>
                    <iframe src="SelectBankSavings.aspx?CompanyID=<% =Request.QueryString["CompanyID"]%>&orderid=<% =Request.QueryString["orderid"]%>&type=Savings"
                        width="600px" height="400px" id="myifream" style="vertical-align: top; margin-left: 10px">
                    </iframe>
                </div>
            </td>
        </tr>
    </table>
    <%--<div>
        <input type="button" value="董事信息" onclick='GoTo("CompanyDirectors.aspx","<% =Request.QueryString["CompanyID"]%>","<% =Request.QueryString["orderid"]%>");' />
        <input type="button" value="银行月结单" onclick='GoTo("SelectBank.aspx","<% =Request.QueryString["CompanyID"]%>","<% =Request.QueryString["orderid"]%>");' />
        <input type="button" value="销货凭证" onclick='GoTo("SelectSales.aspx","<% =Request.QueryString["CompanyID"]%>","<% =Request.QueryString["orderid"]%>");' />
        <input type="button" value="购货凭证" onclick='GoTo("selectPurchase.aspx","<% =Request.QueryString["CompanyID"]%>","<% =Request.QueryString["orderid"]%>");' />
        <input type="button" value="开支明细" onclick='GoTo("CompanyDetail.aspx","<% =Request.QueryString["CompanyID"]%>","<% =Request.QueryString["orderid"]%>");' />
        <input type="button" value="描述" onclick='GoTo("ProfitTax.aspx","<% =Request.QueryString["CompanyID"]%>","<% =Request.QueryString["orderid"]%>");' />
        <input type="button" value="报表" onclick='GoTo("companyTable.aspx","<% =Request.QueryString["CompanyID"]%>","<% =Request.QueryString["orderid"]%>");' />
    </div>
    <h2>
        银行对账单</h2>
    <input type="button" value="销货凭证" onclick='GoToSales("<% =Request.QueryString["CompanyID"]%>","<% =Request.QueryString["orderid"]%>");' />
    <h2>
        支票账户</h2>
    <input type="button" value="新增支票账户对账单" onclick='GoToCreateBank("<% =Request.QueryString["CompanyID"]%>","<% =Request.QueryString["orderid"]%>","Check");' />
    <asp:GridView ID="GridView1" runat="server" AutoGenerateColumns="False" DataKeyNames="id"
        OnRowDeleting="GridView1_RowDeleting">
        <Columns>
            <asp:BoundField DataField="Date" HeaderText="日期" SortExpression="Date" />
            <asp:BoundField DataField="VoucherNo" HeaderText="凭证" SortExpression="VoucherNo" />
            <asp:BoundField DataField="Amount" HeaderText="金额" SortExpression="Amount" />
            <asp:BoundField DataField="HKMoney" HeaderText="港币" SortExpression="HKMoney" />
            <asp:BoundField DataField="Explain" HeaderText="备注" SortExpression="Explain" />
            <asp:CommandField ShowDeleteButton="True" />
        </Columns>
    </asp:GridView>
    <h2>
        储蓄账户</h2>
    <input type="button" value="新增储蓄账户对账单" onclick='GoToCreateBank("<% =Request.QueryString["CompanyID"]%>","<% =Request.QueryString["orderid"]%>","Savings");' />
    <asp:GridView ID="GridView2" runat="server" AutoGenerateColumns="False" DataKeyNames="id"
        OnRowDeleting="GridView1_RowDeleting">
        <Columns>
            <asp:BoundField DataField="Date" HeaderText="日期" SortExpression="Date" />
            <asp:BoundField DataField="VoucherNo" HeaderText="凭证" SortExpression="VoucherNo" />
            <asp:BoundField DataField="Amount" HeaderText="金额" SortExpression="Amount" />
            <asp:BoundField DataField="HKMoney" HeaderText="港币" SortExpression="HKMoney" />
            <asp:BoundField DataField="Explain" HeaderText="备注" SortExpression="Explain" />
            <asp:CommandField ShowDeleteButton="True" />
        </Columns>
    </asp:GridView>
    <h2>
        其他币种</h2>
    <input type="button" value="新增其他币种对账单" onclick='GoToCreateBank("<% =Request.QueryString["CompanyID"]%>","<% =Request.QueryString["orderid"]%>","other");' />
    <asp:GridView ID="GridView3" runat="server" AutoGenerateColumns="False" DataKeyNames="id"
        OnRowDataBound="GridView1_RowDataBound" OnRowDeleting="GridView1_RowDeleting">
        <Columns>
            <asp:BoundField DataField="Date" HeaderText="日期" SortExpression="Date" />
            <asp:BoundField DataField="VoucherNo" HeaderText="凭证" SortExpression="VoucherNo" />
            <asp:BoundField DataField="Amount" HeaderText="金额" SortExpression="Amount" />
            <asp:BoundField DataField="Currency" HeaderText="币种" SortExpression="Currency" />
            <asp:BoundField DataField="HKMoney" HeaderText="港币" SortExpression="HKMoney" />
            <asp:BoundField DataField="Explain" HeaderText="备注" SortExpression="Explain" />
            <asp:CommandField ShowDeleteButton="True" />
        </Columns>
    </asp:GridView>--%>
    <script>
        $(function () {
            var v = Cookies.getCookie("Bank");
            if (v != null) {
                Cookies.setCookie("Bank", "", -1, "/");
            }
        }); 

    </script>
</asp:Content>
